﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{//1、猫、狗、鸭、猴，（吃、游泳、爬树）
    class Program
    {
        static void Main() 
        {
            Cat c = new Cat("猫");
            Test(c);

            Console.WriteLine();
            Dog d = new Dog("狗");
            Test1(d);
            

            Console.WriteLine();
            Duck du = new Duck("鸭");
            Test2(du);

            Console.WriteLine();
            Monkey m = new Monkey("猴");
            Test3(m);
        }
        static void Test(Cat c)
          {
            c.Eat();
            c.Climbing();

        }
        static void Test1(Dog d)
        {
            d.Climbing();
            d.Eat();

        }
        static void Test2(Duck d)
        {
            d.Swim();
            d.Eat();
        }
        static void Test3(Monkey m)
        {
            m.Climbing();
            m.Eat();

        }
    }
    interface IEat
    {
        void Eat();
    }
    interface ISwim
    {
        void Swim();
    }
    interface IClimbing
    {
        void Climbing();
    }
}
